<?php
namespace app\admin\controller;

\think\Loader::import('controller/Controller', \think\Config::get('traits_path') , EXT);
use app\admin\Controller;
use think\Db;
use think\Loader;
use think\Config;
use think\exception\HttpException;
use app\admin\controller\Member;
class Scan extends Controller
{
    use \app\admin\traits\controller\Controller;
	    // 方法黑名单
    protected static $blacklist = [];
    protected function filter(&$map)
    {
        if ($this->request->param('name')) {
            $map['title'] = ["like", "%" . $this->request->param('name') . "%"];
		  
        }
         $map['status']=['>=',0];
         //$map['cat_id']=array('neq',6);
    }
	public function index(){
		$print_info_id=1;
		$info=Db::name('print_table')->where("id=$print_info_id")->find();
		if(!empty($info))
		{
			//生成一个预览的序列号
			$member=new Member();
			$serial=$member->create_serial_code();
			$this->view->assign('serial',$serial);
			//生成序列号结束
			$date=date("Y-m-d");
			$card_type=Db::name('brand')->where("status >0 and isdelete=0")->order('sort')->select(); //申请车型列表
			$this->view->assign('card_type',$card_type);
			$this->view->assign('info',$info);
			$this->view->assign('date',$date);
			return $this->view->fetch();
		}else
		{
			$r=array('msg'=>'can no find the data！');
			return ajax_return_adv_error($r);
		}
	}
}
?>